package com.ruoyi.sysOrder.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sysOrder.mapper.SysOrderMapper;
import com.ruoyi.sysOrder.domain.SysOrder;
import com.ruoyi.sysOrder.service.ISysOrderService;

/**
 * 业务订单Service业务层处理
 * 
 * @author llm
 * @date 2025-05-15
 */
@Service
public class SysOrderServiceImpl implements ISysOrderService 
{
    @Autowired
    private SysOrderMapper sysOrderMapper;

    /**
     * 查询业务订单
     * 
     * @param orderID 业务订单主键
     * @return 业务订单
     */
    @Override
    public SysOrder selectSysOrderByOrderID(Long orderID)
    {
        return sysOrderMapper.selectSysOrderByOrderID(orderID);
    }

    /**
     * 查询业务订单列表
     * 
     * @param sysOrder 业务订单
     * @return 业务订单
     */
    @Override
    public List<SysOrder> selectSysOrderList(SysOrder sysOrder)
    {
        return sysOrderMapper.selectSysOrderList(sysOrder);
    }

    /**
     * 新增业务订单
     * 
     * @param sysOrder 业务订单
     * @return 结果
     */
    @Override
    public int insertSysOrder(SysOrder sysOrder)
    {
        sysOrder.setCreateTime(DateUtils.getNowDate());
        return sysOrderMapper.insertSysOrder(sysOrder);
    }

    /**
     * 修改业务订单
     * 
     * @param sysOrder 业务订单
     * @return 结果
     */
    @Override
    public int updateSysOrder(SysOrder sysOrder)
    {
        sysOrder.setUpdateTime(DateUtils.getNowDate());
        return sysOrderMapper.updateSysOrder(sysOrder);
    }

    /**
     * 批量删除业务订单
     * 
     * @param orderIDs 需要删除的业务订单主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderByOrderIDs(Long[] orderIDs)
    {
        return sysOrderMapper.deleteSysOrderByOrderIDs(orderIDs);
    }

    /**
     * 删除业务订单信息
     * 
     * @param orderID 业务订单主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderByOrderID(Long orderID)
    {
        return sysOrderMapper.deleteSysOrderByOrderID(orderID);
    }
}
